home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-ARM / ELF.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  2KB  |  69 lines

  1. #ifndef __ASMARM_ELF_H
  2. #define __ASMARM_ELF_H
  3.  
  4. /*
  5.  * ELF register definitions..
  6.  */
  7.  
  8. #include <asm/ptrace.h>
  9. #include <asm/proc/elf.h>
  10. #include <asm/procinfo.h>
  11.  
  12. typedef unsigned long elf_greg_t;
  13.  
  14. #define EM_ARM    40
  15.  
  16. #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
  17. typedef elf_greg_t elf_gregset_t[ELF_NGREG];
  18.  
  19. typedef struct { void *null; } elf_fpregset_t;
  20.  
  21. /*
  22.  * This is used to ensure we don't load something for the wrong architecture.
  23.  */
  24. #define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && (ELF_PROC_OK((x))) )
  25.  
  26. /*
  27.  * These are used to set parameters in the core dumps.
  28.  */
  29. #define ELF_CLASS    ELFCLASS32
  30. #define ELF_DATA    ELFDATA2LSB;
  31. #define ELF_ARCH    EM_ARM
  32.  
  33. #define USE_ELF_CORE_DUMP
  34.  
  35. /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
  36.    use of this is to invoke "./ld.so someprog" to test out a new version of
  37.    the loader.  We need to make sure that it is out of the way of the program
  38.    that it will "exec", and that there is sufficient room for the brk.  */
  39.  
  40. #define ELF_ET_DYN_BASE    (2 * TASK_SIZE / 3)
  41.  
  42. /* When the program starts, a1 contains a pointer to a function to be 
  43.    registered with atexit, as per the SVR4 ABI.  A value of 0 means we 
  44.    have no such handler.  */
  45. #define ELF_PLAT_INIT(_r)    (_r)->ARM_r0 = 0
  46.  
  47. /* This yields a mask that user programs can use to figure out what
  48.    instruction set this cpu supports. */
  49.  
  50. #define ELF_HWCAP    (armidlist[armidindex].hwcap)
  51.  
  52. /* This yields a string that ld.so will use to load implementation
  53.    specific libraries for optimization.  This is more specific in
  54.    intent than poking at uname or /proc/cpuinfo. */
  55.  
  56. /* For now we just provide a fairly general string that describes the
  57.    processor family.  This could be made more specific later if someone
  58.    implemented optimisations that require it.  26-bit CPUs give you
  59.    "v1l" for ARM2 (no SWP) and "v2l" for anything else (ARM1 isn't
  60.    supported).  32-bit CPUs give you "v3[lb]" for anything based on an
  61.    ARM6 or ARM7 core and "armv4[lb]" for anything based on a StrongARM-1
  62.    core.  */
  63.  
  64. #define ELF_PLATFORM_SIZE 8
  65. extern char elf_platform[];
  66. #define ELF_PLATFORM    (elf_platform)
  67.  
  68. #endif
  69.